﻿namespace Socket.Core
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Runtime.CompilerServices;

    public class DefaultPackageCommand : IPackageCommand
    {
        public List<IReceiveInfo> PartPackageCommand(ISession session, byte[] bytes, int Offset, int Length)
        {
            List<IReceiveInfo> list = new List<IReceiveInfo>();
            IReceiveInfo item = new ReceiveInfo {
                ReceiveStream = new MemoryStream(),
                ReceiveTime = DateTime.Now
            };
            item.ReceiveStream.Write(bytes, Offset, Length);
            list.Add(item);
            return list;
        }

        public ConfigAbstract Config { get; set; }

        public int MessageHeadLength
        {
            get
            {
                return 0;
            }
        }
    }
}

